package com.assisjrs.jpaandroid.sample.basic;

import android.widget.EditText;

import com.assisjrs.jpaandroid.sample.R;

public class CostumerActivity extends CrudActivity<Costumer> {
	private EditText firstName;

	@Override
	protected void bindToView() {
		setContentView(R.layout.form);

		firstName = (EditText) findViewById(R.id.txtFirstName);
	}

	@Override
	protected void instanceToView(final Costumer instance) {
		firstName.setText(instance.getFirstName());
	}

	@Override
	protected void viewToInstance(final Costumer instance) {
		instance.setFirstName(firstName.getText().toString());
	}
}